<?php
include_once("./common.inc.php");
$smarty = new Tpl();
$id = intval(get_param("id"));
$artModel = new Model("article");

//分类
$catModel = new Model('category');
$cat = $catModel->where("id=$id")->get_one();
$smarty->assign('catinfo', $cat);

// 列表
$list = $artModel->where("category=$id")->get();
$smarty->assign("list", $list);

//广告图
$advModel = new Model('advertise');
$adv = $advModel->where(array('type'=>4,'link'=>$id))->get_one();
$smarty->assign('adv',$adv);
// 产品
$product = new Model("product");
$product = $product->order('`order`, id desc')->get();
$smarty->assign('product', $product);
$smarty->display("artList.html");
